<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:include="base/head::head"/>
<!--定时任务-->
<body>
<div th:replace="base/load::load"/>
<div id="table-tool">
    <a id="btn-add" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="onOpenAddDialog()">新增</a>
    <a id="btn-edit" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="onOpenEditDialog()">修改</a>
    <a id="btn-remove" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="onRemove()">删除</a>
    <a id="btn-refresh" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-refresh',plain:true" onclick="onRefresh()">刷新</a>
</div>
<table id="table" class="easyui-datagrid" data-options="url:'page',method:'get',pagination:true,pageSize:30,pageList:[20,30,40,50],fit:true,singleSelect:false,rownumbers:true,toolbar:'#table-tool'">
    <thead>
    <tr>
        <th data-options="field:'id',checkbox:true"></th>
        <th data-options="field:'name',width:100">任务名称</th>
        <th data-options="field:'bean',width:100">Sbean名称</th>
        <th data-options="field:'method',width:100">方法名称</th>
        <th data-options="field:'params',width:100">方法参数</th>
        <th data-options="field:'cron',width:100">Cron表达式</th>
        <th data-options="field:'status',width:100">状态</th>
        <th data-options="field:'comment',width:100">备注</th>
    </tr>
    </thead>
</table>
<!--弹出框-->
<div id="dialog" class="easyui-dialog uq_dialog" data-options="title:'操作',modal:true,closed:true,buttons:'#dialog-tool'">
    <form id="form" method="post">
        <input id="id" name="id" type="hidden"/>
        <table>
            <tr>
                <td>任务名称:</td>
                <td><input id="name" name="name" class="easyui-textbox" style="width: 200px" data-options="required:true,validType:'length[1,64]',prompt:'任务名称'"/></td>
                <td>bean名称:</td>
                <td><input id="bean" name="bean" class="easyui-textbox" style="width: 200px" data-options="required:true,validType:'length[1,64]',prompt:'Spring bean 名称'"/></td>
            </tr>
            <tr>
                <td>方法名称:</td>
                <td><input id="method" name="method" class="easyui-textbox" style="width: 200px" data-options="required:true,validType:'length[1,64]',prompt:'方法名称'"/></td>
                <td>方法参数:</td>
                <td><input id="params" name="params" class="easyui-textbox" style="width: 200px" data-options="validType:'length[1,64]',prompt:'方法参数'"/></td>
            </tr>
            <tr>
                <td>Cron表达式:</td>
                <td><input id="cron" name="cron" class="easyui-textbox" style="width: 200px" data-options="required:true,validType:'length[1,64]',prompt:'Cron表达式，定时时间设置'"/></td>
                <td>状态:</td>
                <td><select id="status" name="status" class="easyui-combobox" style="width: 200px" data-options="value:1,panelHeight:'auto',required:true,prompt:'状态 0=正常 1=暂停'">
                    <option value="0">正常</option>
                    <option value="1">暂停</option>
                </select></td>
            </tr>
            <tr>
                <td>备注:</td>
                <td colspan="3"><input id="comment" name="comment" class="easyui-textbox" style="width: 100%" data-options="validType:'length[1,256]',prompt:'备注'"/></td>
            </tr>
        </table>
    </form>
</div>
<div id="dialog-tool">
    <a id="dialog-save" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ok'" onclick="onSave()">保存</a>
    <a id="dialog-close" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-close'" onclick="javascript:$('#dialog').dialog('close')">关闭</a>
</div>
<script type="text/javascript" th:src="@{/utils/System.js}"></script>
</body>
</html>

